<template>
  <div id="Detail_info">
    <div class="info_title">
      {{ info_data.title }}
    </div>
    <div class="info_price">
      <span class="new_price">{{ info_data.newprice }}</span>
      <span class="old_price" v-if="info_data.oldprice != ''">{{
        info_data.oldprice
      }}</span>
      <span class="discount" v-if="info_data.discount != ''">{{
        info_data.discount
      }}</span>
    </div>
    <div class="goods_info">
      <span
        class="info"
        v-for="(item, index) in info_data.columns"
        :key="index"
      >
        {{ item }}
      </span>
    </div>
    <div class="AfterSale">
      <div
        class="send_deatil"
        v-for="(item, index) in info_data.services"
        :key="index"
      >
        <img :src="item.icon" alt="" />
        {{ item.name }}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Detail_info",
  props: {
    info_data: {
      type: Object,
      default: {},
    },
  },
}
</script>

<style lang="less" scoped>
#Detail_info {
  padding: 0 7px;
  margin-top: 13px;
  border-bottom: 1.3333vw solid #f2f5f8;
}
.info_title {
  height: 55px;
  font-size: 14px;
  overflow: hidden;
}

.info_price {
  position: relative;
  margin-top: 2.6666vw;
  .new_price {
    font-size: 20px;
    color: #ff5777;
  }
  .old_price {
    font-size: 12px;
    color: #9999;
    text-decoration: line-through;
    margin-left: 5px;
  }
  .discount {
    position: absolute;
    top: -1px;
    padding: 0.5333vw 1.33333vw;
    background-color: #ff5777;
    color: #fff;
    border-radius: 10px;
    margin-left: 5px;
    font-size: 12px;
  }
}

.goods_info {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  line-height: 20px;
  border-bottom: 1px solid rgba(100, 100, 100, 0.1);
  .info {
    flex: 1;
    font-size: 12px;
    color: #6666;
  }
}

.AfterSale {
  display: flex;
  justify-content: space-between;
  align-items: center;
  div {
    flex: 1;
    line-height: 16vw;
    font-size: 10px;
    color: #333333;
    img {
      width: 12px;
      height: 12px;
      vertical-align: middle;
    }
  }
}
</style>
